package com.server.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.StringJoiner;

/**
 * The type Users.
 */
public class Users {
    private Integer userId;

    private String userName;

    private String userPassword;

    private String userSecondname;

    private String userSex;

    private Date userBirth;

    private String userMilitaryCard;

    private Boolean userActive;

    private Date usersCreate;

    private BigDecimal userBalance;

    /**
     * Instantiates a new Users.
     *
     * @param userName         the user name
     * @param userPassword     the user password
     * @param userSecondname   the user secondname
     * @param userSex          the user sex
     * @param userBirth        the user birth
     * @param userMilitaryCard the user military card
     * @param userActive       the user active
     * @param usersCreate      the users create
     * @param userBalance      the user balance
     */
    public Users(String userName, String userPassword, String userSecondname, String userSex, Date userBirth, String userMilitaryCard, Boolean userActive, Date usersCreate, BigDecimal userBalance) {
        this.userName = userName;
        this.userPassword = userPassword;
        this.userSecondname = userSecondname;
        this.userSex = userSex;
        this.userBirth = userBirth;
        this.userMilitaryCard = userMilitaryCard;
        this.userActive = userActive;
        this.usersCreate = usersCreate;
        this.userBalance = userBalance;
    }

    /**
     * Instantiates a new Users.
     */
    public Users() {
    }

    /**
     * Gets user id.
     *
     * @return the user id
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * Sets user id.
     *
     * @param userId the user id
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * Gets user name.
     *
     * @return the user name
     */
    public String getUserName() {
        return userName;
    }

    /**
     * Sets user name.
     *
     * @param userName the user name
     */
    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    /**
     * Gets user password.
     *
     * @return the user password
     */
    public String getUserPassword() {
        return userPassword;
    }

    /**
     * Sets user password.
     *
     * @param userPassword the user password
     */
    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword == null ? null : userPassword.trim();
    }

    /**
     * Gets user secondname.
     *
     * @return the user secondname
     */
    public String getUserSecondname() {
        return userSecondname;
    }

    /**
     * Sets user secondname.
     *
     * @param userSecondname the user secondname
     */
    public void setUserSecondname(String userSecondname) {
        this.userSecondname = userSecondname == null ? null : userSecondname.trim();
    }

    /**
     * Gets user sex.
     *
     * @return the user sex
     */
    public String getUserSex() {
        return userSex;
    }

    /**
     * Sets user sex.
     *
     * @param userSex the user sex
     */
    public void setUserSex(String userSex) {
        this.userSex = userSex == null ? null : userSex.trim();
    }

    /**
     * Gets user birth.
     *
     * @return the user birth
     */
    public Date getUserBirth() {
        return userBirth;
    }

    /**
     * Sets user birth.
     *
     * @param userBirth the user birth
     */
    public void setUserBirth(Date userBirth) {
        this.userBirth = userBirth;
    }

    /**
     * Gets user military card.
     *
     * @return the user military card
     */
    public String getUserMilitaryCard() {
        return userMilitaryCard;
    }

    /**
     * Sets user military card.
     *
     * @param userMilitaryCard the user military card
     */
    public void setUserMilitaryCard(String userMilitaryCard) {
        this.userMilitaryCard = userMilitaryCard == null ? null : userMilitaryCard.trim();
    }

    /**
     * Gets user active.
     *
     * @return the user active
     */
    public Boolean getUserActive() {
        return userActive;
    }

    /**
     * Sets user active.
     *
     * @param userActive the user active
     */
    public void setUserActive(Boolean userActive) {
        this.userActive = userActive;
    }

    /**
     * Gets users create.
     *
     * @return the users create
     */
    public Date getUsersCreate() {
        return usersCreate;
    }

    /**
     * Sets users create.
     *
     * @param usersCreate the users create
     */
    public void setUsersCreate(Date usersCreate) {
        this.usersCreate = usersCreate;
    }

    /**
     * Gets user balance.
     *
     * @return the user balance
     */
    public BigDecimal getUserBalance() {
        return userBalance;
    }

    /**
     * Sets user balance.
     *
     * @param userBalance the user balance
     */
    public void setUserBalance(BigDecimal userBalance) {
        this.userBalance = userBalance;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Users.class.getSimpleName() + "[", "]")
                .add("userId=" + userId)
                .add("userName='" + userName + "'")
                .add("userPassword='" + userPassword + "'")
                .add("userSecondname='" + userSecondname + "'")
                .add("userSex='" + userSex + "'")
                .add("userBirth=" + userBirth)
                .add("userMilitaryCard='" + userMilitaryCard + "'")
                .add("userActive=" + userActive)
                .add("usersCreate=" + usersCreate)
                .add("userBalance=" + userBalance)
                .toString();
    }
}